<template>
  <el-row class="top-stats-row">
    <el-col :span="24">
      <el-card class="new-employee-card" shadow="never">
        <div class="stats-body">
          <!-- <div class="stat-start">
            <img src="@/assets/images/analysis.png" />
            <span class="label">数据总览</span>
          </div> -->
          <div
            class="stat-item"
            style="border-radius: 8px; background: #f0f9ff"
          >
            <span
              class="value"
              style="
                color: #0082d8;
                font-family: 'Source Han Sans CN';
                font-size: 18px;
                font-style: normal;
                font-weight: 500;
                line-height: normal;
              "
              >{{ overview.entryNum || "暂无" }}</span
            >
            <span class="label">本月新入职员工</span>
          </div>
          <div
            class="stat-item"
            style="border-radius: 8px; background: #eff6ff"
          >
            <span
              class="value"
              style="
                color: #1064cf;
                font-family: 'Source Han Sans CN';
                font-size: 18px;
                font-style: normal;
                font-weight: 500;
                line-height: normal;
              "
              >{{ overview.icontractNum || "暂无" }}</span
            >
            <span class="label">近期到期合同</span>
          </div>
          <div
            class="stat-item"
            style="border-radius: 8px; background: #e5fff9"
          >
            <span
              class="value"
              style="
                color: #09c096;
                font-family: 'DIN Alternate';
                font-size: 24px;
                font-style: normal;
                font-weight: 700;
                line-height: normal;
              "
              >{{ overview.regularizedNum || "暂无" }}</span
            >
            <span class="label">本月转正员工</span>
          </div>
          <div
            class="stat-item"
            style="border-radius: 8px; background: #fff8f0"
          >
            <span
              class="value"
              style="
                color: #ed7f01;
                font-family: 'DIN Alternate';
                font-size: 24px;
                font-style: normal;
                font-weight: 700;
                line-height: normal;
              "
              >{{ overview.transferNum || "暂无" }}</span
            >
            <span class="label">本月调动员工</span>
          </div>
          <div
            class="stat-item"
            style="border-radius: 8px; background: #dcfbfe"
          >
            <span
              class="value"
              style="
                color: #01d8ed;
                font-family: 'DIN Alternate';
                font-size: 24px;
                font-style: normal;
                font-weight: 700;
                line-height: normal;
              "
              >{{ overview.dimissionNum || "暂无" }}</span
            >
            <span class="label">本月离职员工</span>
          </div>
          <div
            class="stat-item"
            style="border-radius: 8px; background: #fef3f1"
          >
            <span
              class="value"
              style="
                color: #df2f0f;
                font-family: 'DIN Alternate';
                font-size: 24px;
                font-style: normal;
                font-weight: 700;
                line-height: normal;
              "
              >{{ overview.interviewNum || "暂无" }}</span
            >
            <span class="label">本月面试候选</span>
          </div>
        </div>
      </el-card>
    </el-col>
  </el-row>
</template>

<script setup>
defineProps({
  overview: {
    type: Object,
    required: true,
  },
});
</script>

<style lang="scss" scoped>
/* 新增入职统计样式 */
.top-stats-row {
  padding: 20px 0px 0px 0px;
  .new-employee-card {
    // background: rgba(238, 239, 245);
    :deep(.el-card__body) {
      padding: 10px !important;
    }

    .stats-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;

      h3 {
        margin: 0;
        color: #303133;
        font-size: 16px;
        font-weight: 600;
      }

      .el-tag {
        font-size: 14px;
        padding: 8px 12px;
        border-radius: 8px;
      }
    }

    .stats-body {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 20px;

      .stat-item {
        display: flex;
        padding: 20px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2px;
        flex: 1 0 0;

        .label {
          display: block;
          color: var(--Primary4-900, #21252b);
          font-family: "Source Han Sans CN";
          font-size: 13px;
          font-style: normal;
          font-weight: 400;
          line-height: normal;
        }

        .value {
          font-size: 18px;
          font-weight: 600;
          color: #007bff;
        }
      }
    }
  }
}
/* 彻底无边框 */
.el-card {
  border: none !important; /* 移除边框 */
  box-shadow: none !important; /* 确保阴影完全关闭（双重保险） */
}

/* 如果存在内部伪元素边框（某些版本可能有） */
.el-card::before {
  display: none !important;
}
</style>
